package org.custom.spring.boot.datasource.entity.datasource;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;

import javax.validation.constraints.NotBlank;

/**
 * 自定义数据源属性实体类
 *
 * @author 李坤
 * @date 2022/4/1 9:14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("数据源配置参数实体类")
@EqualsAndHashCode(callSuper = true)
public class CustomDataSourceProperties extends DataSourceProperties {

    /**
     * ID标识
     */
    @NotBlank(message = "数据源ID不能为空")
    @ApiModelProperty(value = "id", notes = "数据源ID")
    private String id;

    /**
     * 数据源所属用户
     */
    @ApiModelProperty(value = "owner", notes = "数据源所属用户")
    private String owner;

}
